Skip to content

[APP-2415] Full transition to CSS Logical Properties to improve RTL#515

Merged
rami-elementor merged 27 commits into
developfrom
APP-2415-logical-properties
May 27, 2026
Merged

[APP-2415] Full transition to CSS Logical Properties to improve RTL#515
rami-elementor merged 27 commits into
developfrom
APP-2415-logical-properties

Conversation

@rami-elementor

@rami-elementor rami-elementor commented Feb 6, 2026

Copy link
Copy Markdown
Member

✨ PR Description

1. Problem & Context

Comprehensive RTL support requires replacing physical CSS properties (left/right/top/bottom, margin-left/right, padding-left/right) with logical equivalents (start/end, block/inline). This enables automatic mirroring for RTL locales without conditional styling or layout shifts.

2. What Changed (Where)

Core files: Replaced directional properties across ~100+ JS/CSS files. Key pattern: marginRightmarginInlineEnd, borderTopborderBlockStart, left: 0inset: 0, padding-bottompadding-block-end.

Infrastructure: Added @mui/system dependency for RtlProvider wrapper in pie-chart. Added Rotate component for icon rotation instead of inline sx={{ rotate }}.

Logic: Extracted RTL detection (usePluginSettingsContext().isRTL) and passed horizontalOrigin/TooltipPlacement dynamically to positioning components (popover, tooltips, sidebar).

Banners: Split compound conditions (!isOpen || viewedBanner → separate checks) and removed redundant RTL selectors (html[dir="rtl"]).

3. How It Works

RTL flows through context provider → components read isRTL flag → compute logical direction props (TooltipPlacement = isRTL ? 'left' : 'right') → passed to MUI components respecting dir="rtl" on root. CSS logical properties auto-flip without JS intervention. No layout recalc needed.

4. Risks

Minor: Icon rotation via Rotate component adds overhead vs inline transform (negligible). Testing gap: RTL rendering untested in preview; recommend verifying pie-chart centering and tooltip placement. Incomplete: PHP margin shorthand (margin-block: 80px) not back-compatible with older browsers—use explicit properties if IE11 support required (unlikely given MUI v7).

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

@rami-elementor rami-elementor marked this pull request as ready for review May 24, 2026 11:16
@rami-elementor rami-elementor requested a review from a team May 24, 2026 11:16
Comment thread assets/dev/css/ea11y-scanner-admin.scss Outdated
Comment thread assets/dev/css/ea11y-scanner-admin.scss Outdated
Comment thread modules/scanner/assets/js/components/alt-text-form/index.js Outdated
Comment thread modules/reviews/assets/src/layouts/user-feedback-form.js Outdated
@rami-elementor rami-elementor merged commit aef16c8 into develop May 27, 2026
74 of 136 checks passed
@rami-elementor rami-elementor deleted the APP-2415-logical-properties branch May 27, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants